package com.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.demo.pojo.entity.Admin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 管理员Mapper接口
 */
@Mapper
public interface AdminMapper extends BaseMapper<Admin> {

    /**
     * 根据管理员账号查询（区分大小写）
     * 使用BINARY关键字确保精确匹配，防止大小写混淆导致的安全问题
     */
    @Select("SELECT * FROM admin WHERE BINARY admin_no = #{adminNo}")
    Admin selectByAdminNo(String adminNo);
}
